#include<stdlib.h>
#include<stdio.h>
#include<string.h>

int main(int argc,char **argv){

    printf("  \n");
    char *linebuf = NULL;
    size_t linesize = 0;
    FILE *pf = NULL;
    int words = 0;
    pf = fopen(argv[1],"r");
    if (pf == NULL)
    {
        perror("file open is error");
        exit(0);
    }
    
    words = getline(&linebuf,&linesize,pf);
    while (1)
    {
        if (getline(&linebuf,&linesize,pf) < 0)
            break;
        printf(" %ld \n",strlen(linebuf));
        printf(" %ld \n",linesize);
        
        // printf(" 文件结尾 \n");
        exit(0);
    }
    


   return 0;
}